<%--
  Copyright &copy; Well All rights reserved.
  User: Well
  Date:2018-03-03
  Description:用户首页
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<table id="user_datagrid"></table>

<div id="user_toolbar" data-options="title:'datagrid查询',collapsible:true,border:false,width:'100%'">
  <form id="user_datagrid_query_form">
    <table>
      <tr>
        <td>
          <input class="easyui-textbox" name="username" data-options="label:'用户名称：'" />
        </td>
        <td>
          <input class="easyui-textbox" name="password" data-options="label:'真实名称：'" />
        </td>
        <td>
          <a href="javascript:$('#user_datagrid').datagrid('query','#user_datagrid_query_form');" class="easyui-querybutton"></a>
          <a href="javascript:$('#user_datagrid_query_form').form('clear');" class="easyui-clearbutton"></a>
        </td>
      </tr>
      <tr>
        <td colspan="3">
          <a href="javascript:$('#user_dialog').dialog({title:'新增',href:'${ctx}/user/form',buttons:[{text:'保存',handler:function(){}},{text:'取消',handler:function(){}}]});" class="easyui-addbutton"></a>
          <a href="javascript:void(0);" class="easyui-editbutton"></a>
          <a href="javascript:void(0);" class="easyui-removebutton"></a>
        </td>
      </tr>
    </table>
  </form>
</div>

<div id="user_dialog">

</div>

<script type="text/javascript">

  (function($){

    var userDatagrid=$("#user_datagrid").datagrid({
      url:"${ctx}/user/datagrid",
      pagination:true,
      toolbar:"#user_toolbar",
      columns:[[
        {field:"id",title:"主键",checkbox:true,align:"center"},
        {field:"username",title:"用户名称",width:"30%",align:"center"},
        {field:"realname",title:"真实名称",width:"30%",align:"center"}
      ]]
    });



  })(jQuery);

</script>